5fb028b889080853433b17d706befbfecfeb0d80,src/main/java/com/spotify/reaper/service/RepairRunner.java,RepairRunner,repairSegment,#number#number#RingRange#,257
Before Change
List<String> potentialCoordinators = jmxConnection.tokenRangeToEndpoint(keyspace, tokenRange);
if (potentialCoordinators.isEmpty()) {
// This segment has a faulty token range. Abort the entire repair run.
boolean success = context.storage.updateRepairRun(repairRun
.with()
.runState(RepairRun.RunState.ERROR)
.lastEvent(String.format("No coordinators for range %s", tokenRange.toString()))
.endTime(DateTime.now())
.build(repairRun.getId()));
if (!success) {
LOG.error("failed updating repair run " + repairRun.getId());
}
return;
}
After Change
List<String> potentialCoordinators = jmxConnection.tokenRangeToEndpoint(keyspace, tokenRange);
if (potentialCoordinators.isEmpty()) {
// This segment has a faulty token range. Abort the entire repair run.
synchronized (this) {
RepairRun repairRun = context.storage.getRepairRun(repairRunId).get();
context.storage.updateRepairRun(repairRun
.with()
.runState(RepairRun.RunState.ERROR)
.lastEvent(String.format("No coordinators for range %s", tokenRange.toString()))
.endTime(DateTime.now())
.build(repairRunId));
}
return;
}